home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
009a
/
quad21.zip
/
QUADRIVE.DOC
next >
Wrap
Text File
|
1991-10-07
|
19KB
|
312 lines
QUADRIVE
Copyright 1991 Ronald Q. Smith
QUADRIVE is a DOS diskette driver for use with 1.2MB 5 1/4" diskette drives. It
works with many IBM and other fully compatible personal computers to add support
for a 720KB format using standard 360KB floppy disks. QUADRIVE will allow you
to read, write, format, and use most DOS compatible utilities as if your drive
was a 3 1/2" 720KB drive. This is the format used by the Tandy model 2000 and a
few other vendors, so you can interchange diskettes between those systems and
your new system. It may also be useful for making exact copies of 720KB 3 1/2"
diskettes when you have one 3 1/2" drive and the 1.2MB drive. If you have a
system with a true 720KB 5 1/4" drive, QUADRIVE will allow you to use that
drive with standard DOS functions.
DEFINITION OF SHAREWARE
Shareware distribution gives users a chance to try software before buying it. If
you try a Shareware program and continue using it, you are expected to register.
Individual programs differ on details -- some request registration while others
require it, some specify a maximum trial period. With registration, you get
anything from the simple right to continue using the software to an updated
program with printed manual.
Copyright laws apply to both Shareware and commercial software, and the copy-
right holder retains all rights, with a few specific exceptions as stated below.
Shareware authors are accomplished programmers, just like commercial authors,
and the programs are of comparable quality. (In both cases, there are good
programs and bad ones!) The main difference is in the method of distribution.
The author specifically grants the right to copy and distribute the software,
either to all and sundry or to a specific group. For example, some authors
require written permission before a commercial disk vendor may copy their
Shareware.
Shareware is a distribution method, not a type of software. You should find
software that suits your needs and pocketbook, whether it's commercial or
Shareware. The Shareware system makes fitting your needs easier, because you can
try before you buy. And because the overhead is low, prices are low also.
Shareware has the ultimate money-back guarantee -- if you don't use the product,
you don't pay for it.
DISCLAIMER - AGREEMENT
Users of QUADRIVE must accept this disclaimer of warranty:
"QUADRIVE is supplied as is. The author disclaims all warranties, expressed or
implied, including, without limitation, the warranties of merchantability and of
fitness for any purpose. The author assumes no liability for damages, direct or
consequential, which may result from the use of QUADRIVE."
QUADRIVE is a "shareware program" and is provided at no charge to the user for
evaluation. Feel free to share it with your friends, but please do not give it
away altered or as part of another system. The essence of "user-supported"
software is to provide personal computer users with quality software without
high prices, and yet to provide incentive for programmers to continue to develop
new products.
If you find this program useful and find that you are using QUADRIVE and
continue to use QUADRIVE after a reasonable trial period, you must make a
registration payment of $20 to Ronald Q. Smith at the address below. The
$20 registration fee will license one copy for use on any one computer at any
one time. For one year after receipt of the this registration fee, you will
recieve notification of the availability of any updates. If you report a bug
within 3 months of receipt of the registration fee, you will receive a
correction to the problem or the fee will be refunded to you. For a $45
registration fee you will receive the latest version including a copy of the
source code and technical documentation on the source code. You will also
automatically receive any updates for one year. If you report a bug within 3
months of receipt of the registration fee, you will receive a correction to
the problem or the fee will be refunded to you. If you license the source
code, you may use it to maintain your copy of QUADRIVE and as a source of
information. You may not use any or all of it in your own products without
first obtaining authorization from Ronald Q. Smith.
You must treat this software just like a book. An example is that this
software may be used by any number of people and may be freely moved from one
computer location to another, so long as there is no possibility of it being
used at one location while it's being used at another. Just as a book cannot
be read by two different persons at the same time.
Commercial users of QUADRIVE must register and pay for their copies of QUADRIVE
within 30 days of first use or their license is withdrawn. Site-License
arrangements and volume discounts may be made by contacting Ronald Q. Smith.
Anyone distributing QUADRIVE for any kind of remuneration must first contact
Ronald Q. Smith at the address below for authorization.
Send fees and any inquiries to:
Ronald Q. Smith
11 Black Oak Road
North Oaks, Mn. 55127-6204
You may also contact me via CompuServ mail at userid 71620,514. I will be happy
to respond to any problems and suggestions for future capabilities.
You are encouraged to pass a copy of QUADRIVE along to your friends for evalua-
tion. Please encourage them to register their copy if they find that they can
use it.
USING QUADRIVE
QUADRIVE allows you to use any mixture of 160KB, 180KB, 320KB, 360KB, 720KB, and
1.2MB formats on the drive. The new 720KB format is identical in all respects
except pysical size to the 3 1/2" 720KB format. In fact, DOS utilities such as
FORMAT and DISKCOPY will believe that it is a 3 1/2" 720KB media. QUADRIVE will
also allow you to read and write your Tandy and DEC 720KB diskettes that your
new system doesn't support. At least these vendors and probably several others
supported a 720KB capacity on 5 1/4" diskettes. That is the capacity that
QUADRIVE supports. The full capabilities of QUADRIVE are only available with
DOS data formats and structures. It will not support CP/M or other non-standard
formats for file access. You will be able to format, disk copy, and disk
compare any 8 or 9 sector-per-track and 40 or 80 cylinder format even if it is
not otherwise a DOS format. There are many very good commercial software
packages that provide support for file access for CP/M and many other formats.
Note that a DOS device driver is only effective when all access to the device is
via DOS. This includes both files and the drive oriented interfaces such as INT
25H and INT 26H. Any application that uses the BIOS directly, such as many
backup utilities, will not be able to use QUADRIVE. DOS BACKUP and RESTORE
will, however, work correctly. Non-DOS formatters such as Central Point
Software's PCFORMAT will not correctly support this capacity. They make direct
calls to the BIOS and so don't take advantage of QUADRIVE's BIOS helper that
tells the BIOS how to handle the 720KB format.
The 720KB capacity is inherent in the 1.2MB disk controller and in all 360KB
floppy media. No drive or media specifications are being exceeded. This is
just a format the Microsoft and IBM chose not to support.
The driver is configured in CONFIG.SYS with the statement:
DEVICE=QUADRIVE.SYS /D:d1 [/D:d2] [/D:d3] [/D:d4]
QUADRIVE will support up to four devices concurrently. The parameters d1
through d4 are physical device numbers for which you want 720KB support.
They must represent 1.2MB drives and controllers. These are the physical drive
numbers 0 and 1 and not DOS drive letters A:, B:, etc. Thus if you have a
single floppy drive, you would specify DEVICE=QUADRIVE.SYS /D:0.
You may repeat the same physical device number two or more times. This will
assign multiple drive letters to the same drive just as DOS assigns both A:
and B: to drive 0 if you don't have a drive 1. You will be prompted to change
diskettes with the familiar DOS message when you change the drive letter.
Be sure that you have LASTDRIVE set large enough to accommodate the new drive
letters that will be created. If you have one or two floppy disks, a hard disk,
and a RAM disk, the default value for LASTDRIVE of E will allow you to add
QUADRIVE for one of the floppy drives.
Once QUADRIVE is installed you may refer to the same drive by at least two
names. In fact, you will often have three names by which to refer to that
drive. If you have a single floppy system, DOS will assign the names A: and B:
to that drive and QUADRIVE will add D: or E:. While DOS will carefully prompt
you when switching between drives A: and B:, it is unaware that D: is also the
same drive. Thus you will not be able to successfully execute a COPY A:file
D:file command as you will not have time to change floppies.
If you have a single floppy system and used the following CONFIG.SYS statement,
you will have four drive letters by which you may refer to the drive.
DEVICE=QUADRIVE.SYS /D:0 /D:0
When toggling between A: and B: or D: and E: you will see the prompt message.
However, DOS thinks that A: and B: refer to a 1.2MB drive and that D: and E:
refer to a 3 1/2" 720KB drive and will not prompt you when changing between
A: and D: or E: (or between B: and D: or E:).
Since QUADRIVE will let you read and write all of the existing 5 1/4" formats
as well as the new 720KB format, it may occur to you to wonder why it doesn't
simply add that capability to drive letter A: (and B:). There are actually
two reasons. One is that DOS does not define anyway for a device driver to
redefine any of the standard drives (usually A: through C:). It is possible
only by using undocumented interfaces and we want to avoid that in order to
retain the greatest level of compatibility. The more important reason is that
FORMAT.COM is just too smart for its own good. FORMAT "knows" that you can't
mix those capacities on the same drive. If it thinks the drive is a 1.2MB
drive, it will not let you select the 720KB capacity and vice versa. This is
built right into FORMAT and we really don't want to require a non-standard
FORMAT program when simply using an additional drive letter avoids it.
So, you can read, write, and perform any other function that doesn't require
formatting using the QUADRIVE drive letter, and you can do it using all of
supported formats. If you use a function that requires formatting, you must
use the QUADRIVE letter for 720KB diskettes and the DOS A: or B: drive letter
for other formats. Functions that may require formatting are FORMAT, DISKCOPY,
and BACKUP. DISKCOPY and BACKUP only require formatting if the target disk is
not already formatted.
You can use DISKCOPY, DISKCOMP, and many other copying programs with your
QUADRIVE drive. Just use DISKCOPY E: E: or DISKCOPY E: F: to copy from one
720KB floppy to another. DISKCOPY and others include their own prompting
capability and will notify you when to change diskettes if you use the same
drive letter for both the source and the target. Due to limitations in
DISKCOPY you may not be able to copy from a 720KB diskette to a previously
formatted 360KB diskette without reformatting the target first. While
DISKCOPY will normally format the target as it writes if it discovers that the
target is not formatted, it will see the first track on the previously formatted
360KB diskette as correctly formatted. When it tries to write the second track
and gets an error, DISKCOPY assumes that the diskette is actually damaged and
not just unformatted. That is, DISCOPY will only format if it is unable to
write the first track, and a 360KB floppy has a correct appearing first track
in 720KB mode. If this happens to you, simply format the target floppy with
FORMAT E: (or whatever the QUADRIVE drive letter is) and then repeat your
DISKCOPY. The same rule applies to BACKUP.
TECHNICAL STUFF
The earliest floppy drives supported one or two sides, 40 tracks, and 8 or 9
sectors per track for capacities of 160KB, 180KB, 320KB, and 360KB. The
read/write heads in the drives required a wide data area and a wide gap (by
today's standards) for each track. As the technology for heads and media
improved, the width of the data area and gap were reduced to half the earlier
value. When a modern 360KB drive reads or writes a floppy disk, it leaves a
very wide gap between the tracks. It is basically using every other track on
the device even though it calls them track (cylinder) 0, 1, etc.
By the mid-1980s several PC vendors were using the 720KB format. These included
some DEC and Tandy systems. They simply made small changes to the drive
controller and the BIOS to use every track. When they had to handle an "old"
360KB floppy, the BIOS simply doubled the track (cylinder) number requested.
This format never caught on generally, but QUADRIVE will successfully handle
most of those old diskettes.
When the 1.2MB drive was introduced, it supported the use of both all the tracks
on the drive and higher density media that permitted 15 sectors per track. Like
the other early implementations, when presented with a 360KB diskette, the BIOS
simply doubles the track number for all operations. This then provides the
opportunity for QUADRIVE to use those intervening tracks.
The IBM PC/AT BIOS defined a state machine for its floppy BIOS. As part of the
implementation, the BIOS attempts to sense the format of the media and respond
properly without you having to tell it in advance what capacity you are using.
The BIOS keeps a value that tells it what kind of media it is currently
handling. If you insert a new diskette, the BIOS sets the media type to
unknown. Whenever the BIOS handles a request for an "unknown" media, it first
tries to use the 360KB format. If that gets an I/O error, it tries the 1.2MB
format. Whichever one succeeds causes the BIOS's state for the drive to be set
to "determined" and the media type. The media type state is actually a bit
mask which tells the BIOS what transfer rate to use, whether to double track
numbers, and how many sectors per track to permit.
The BIOS only has two values that it places in the state. These are a 1.2 MB
media type, 15 sectors, and no doubling or 360KB media type, 9 sectors, and
doubling. QUADRIVE takes advantage of this design to create another state value
that looks identical to the BIOS 360KB value except that the doubling bit is not
set. As long as QUADRIVE sets this value in the state before every I/O opera-
tion, it all works.
The reason that you need a full device driver rather than just a little TSR that
sets the state is that you want to be able to continue to use the 360KB and
1.2MB formats. With a device driver, DOS tells QUADRIVE what format it is
expecting and QUADRIVE knows whether to set the state or not. This is the
technique that allows you to use drive letter A: for 1.2MB and 360KB formats and
drive letter E: for 720KB formats.
Actually, QUADRIVE will automatically adjust for reading and writing all media
formats from 160KB, 180KB, 320KB, and 360KB to 720KB and 1.2MB. However, you
cannot FORMAT anything other than the 720KB with the QUADRIVE drive letter.
Unfortunately, while DOS would happily allow QUADRIVE to handle all of these and
does, the FORMAT program itself has an error check which says that the 720KB
format cannot be used on the same drive as the other formats. It is trying to
keep you from accidentally asking to format a true 3 1/2" diskette at 360KB or
1.2 MB or vice versa. Thus it will display an error message and not even try.
Basically, a few programs like FORMAT ask the device driver what physical type
of drive they support and will only allow the capacity options that they know
about for those physical types. In order for QUADRIVE to get FORMAT to work at
all, it must always respond that this is a 3 1/2" drive type. FORMAT then
refuses to accept a request for any of the other capacities.
QUADRIVE will only work with those BIOS implementations (IBM, Mitsubishi,
Phoenix, etc.) that compatibly implement the multi-media state machine described
in the IBM PC/AT Technical Reference manual.
INSIDE QUADRIVE
If you choose to license the source code, you will see that it is fully
annotated with an explanation of what DOS expects from a device driver and
the mechanics of the BIOS state machine. In writing QUADRIVE, I discovered
that the DOS documentation is often incomplete or misleading and is actually
wrong in a few places. It takes a lot of trial and error and time spent with
a debugger to determine what DOS actually wants in all cases.
QUADRIVE is written in Microsoft MASM 6.00. You would need that version of the
assembler to use the source code, but you can use it as a source of information
without anything more than an understanding of assembler code and a copy of a
DOS technical reference manual such as the "Microsoft MS-DOS Programmer's
Reference". In spite of my comment about its completeness, it is an invaluable
source of information for anyone writing system-level programs. I also
recommend "Undocumented DOS" by Andrew Schulman, Raymond J. Michels, Jim Kyle,
Tim Paterson, David Maxey, and Ralf Brown. It does not have as much information
on device drivers but the insite into the inner workings of DOS were very
valuable in trying to figure out what DOS really wants.
IBM is a registered trademark of International Business Machines Corporation.
MS-DOS and Microsoft are registered trademarks of Microsoft Corporation.
REVISION HISTORY
911006 - Version 2.10: Added support for up to four drives. Added
support for multiple drive letters for a drive including
generating diskette change messages.
910927 - Version 2.00: Updated for DOS 3.3 through 5.0. Use 1.2MB
drive to support 720KB.
850612 - Version 1.10: Added support for 720KB drives on Sperry PC-1
and PC/HT.
840819 - Version 1.00: Original version. Support 720KB drive on IBM
PC-1 under DOS 2.10.